package cn.chengpengper.seckill.reservation.application.command;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author chengpeng.hu
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SeckillReservationUserCommand implements Serializable {
    private static final long serialVersionUID = -8480292718329404328L;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 商品id
     */
    private Long goodsId;

    public boolean isEmpty() {
        return this.userId == null
                || this.goodsId == null;
    }

}
